using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;

namespace OfficialGameProject {
	class Enemy {
		public Vector2 Position;
		public float Width;
		public float Height;
		public Texture2D Texture;
		public int Coin;
		public bool IsAlive;
		public float AttackRate;
		public double SpawnSpeed;
		public double SpawnDelay;
		public float FadeInStep;
		public float FadeOutStep;
		public double DelayAfterFadeIn;
		public double FadeDelayCounter;
		public float AlphaValue;
		public bool IsSpawned;


		public Enemy(Vector2 vector2) {
			Position = vector2;
			Width = 70;
			Height = 128;
			Texture = null;
			Coin = 100;
			IsAlive = true;
			AttackRate = 0;
			SpawnSpeed = 0;
			SpawnDelay = 0;
			FadeInStep = 5;
			FadeOutStep = 20;
			DelayAfterFadeIn = 50;
			FadeDelayCounter = 0.0;
			AlphaValue = 0.0f;
			IsSpawned = false;
		}

		public byte SetAlphaValue() {
			var s = MathHelper.Clamp(AlphaValue, 0, 255);
			return (byte)s;
		}

		public void FadeIn(float fadeStep) {
			AlphaValue += fadeStep;
		}

		public void FadeOut(float fadeStep) {
			AlphaValue -= fadeStep;
		}
	}
}
